#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
struct stu
{
	char name[16];
	int m;
	int e;
	int c;
	int ave;
};
void getaverage(struct stu* s)
{
	int i = 0;
	for (i = 0; i < 4; i++)
	{
		s[i].ave = (s[i].c + s[i].e + s[i].m) / 3;
	}
}
int main()
{
	struct stu s[4]= { {"Jessica",98,95,90},{"Mike",80,80,90}, {"Linda",87,76,70},{"Peter",90,100,99} }; 
	int i = 0;
	for (i = 0; i < 4; i++)
	{
		getaverage(s);
	}
	printf("Name\tMath\tEnglish\tCompu\tAverage\n");
	for (i = 0; i < 4; i++)
	{ printf("%s\t%d\t%d\t%d\t%d\n", s[i].name, s[i].m, s[i].e,
		s[i].c, s[i].ave); }
	return 0;
}